
public class SimpleRemoteControl {
    Command slot;
    public SimpleRemoteControl(){
    }

    public void SetCommand(Command command){
        this.slot = command;
    }

    public void buttownWasPressed(){
        slot.execute();
    }
}


/*
light：电灯对象,有on,off开关方法
lightcommand： 命令对象里有light对象，并且有execute,undo方法（interface是command)




 */